<%--
  Created by IntelliJ IDEA.
  User: 123
  Date: 2022/1/4
  Time: 12:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>商城首页</title>
        <link rel="stylesheet" type="text/css" href="css/public.css"/>
        <link rel="stylesheet" type="text/css" href="css/shouye.css"/>
        <script src="js/jquery-3.6.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/front_page.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <%
          String username = (String) session.getAttribute("username");
          String user_id = (String) session.getAttribute("user_id");
          Boolean power = (Boolean) session.getAttribute("power");
        %>
        <div class="head">
            <div class="head_zi">
                <div class="huan">
                    <%if(user_id == null){%>
                    你好，游客，请先登录！
                    <%}else if(power && user_id!= null){ %>
                    <a href="manage.jsp"><%=request.getSession().getAttribute("user_id")%></a>
                    ,欢迎您
                    <%}else if(!power && user_id!= null){ %>
                    <a href="customer.jsp"><%=request.getSession().getAttribute("user_id")%></a>
                    ,欢迎您
                    <%}%>
                </div>
                <div class="car">
                    <a href="./querycar.do"><img src="images/购物车.png" height="28px">
                        <span>购物车</span>
                    </a>
                </div>
                <div class="login">
                    <div><a href="Register.jsp">登录</a></div>
                    <div><a href="Register.jsp">注册</a></div>
                </div>

            </div>
        </div>
        <!--搜索框-->
        <div class="search_kuang">
            <div class="search">
                <form action="./SearchGood.do" method="GET">
                    <input type="text" class="text" name="searchQuery">
                    <button type="submit"><img src="images/搜索图标.png" width="40px"></button>
                </form>
            </div>
        </div>
        <div class="shop">
            <div class="lunbo" >
                <span class="right" id="right"></span>
                <span class="left" id="left"></span>
                <div id="lunbo" >
                    <div>
                        <a href="#"><img src="images/mi11.png" ></a>
                    </div>
                    <div>
                        <a href="#"><img src="images/pingban5.png" ></a>
                    </div>
                    <div>
                        <a href="#"><img src="images/450ebe4e2420eba7064b6ce08b2fc503.jpg"></a>
                    </div>
                    <div>
                        <a href="#"><img src="images/3e34ddd6b7bcbfb90ed09e871d291593.png" ></a>
                    </div>
                    <div>
                        <a href="#"><img src="images/f89261d8655d76f2ab2340e4a3738678.jpg"></a>
                    </div>
                </div>
            </div>
            <div class="nei">
                <div class="box_tit w">
                    <h2 class="title"><a href="./category.do?category=书籍">书籍</a></h2>
                    <div class="nei_pohot">
                        <ul>
                            <li class="phone_tu">
                                <a href="./detail.do?id=book02">
                                    <div class="ph">
                                        <img src="images/carts/f84ce8d17e55cf74.jpg" >
                                    </div>
                                    <div class="na">Vue.js全家桶零基础入门到进阶项目实战</div>
                                    <p>￥99.20</p>
                                </a>
                            </li>
                            <li class="phone_tu">
                                <a href="./detail.do?id=book01">
                                    <div class="ph">
                                        <img src="images/carts/8e7d4ce45fdacb89.jpg" >
                                    </div>
                                    <div class="na">CSS新世界</div>
                                    <p>￥108.80</p>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="box_tit w">
                    <h2 class="title"><a href="./category.do?category=电脑">电脑</a></h2>
                    <div class="nei_pohot">
                        <ul>
                            <li class="phone_tu">
                                <a href="./detail.do?id=com01">
                                    <div class="ph">
                                        <img src="images/computer/dbeee1b261367546.jpg" >
                                    </div>
                                    <div class="na">微星(MSI)PRO 电脑主板</div>
                                    <p>￥3629</p>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="box_tit w">
                    <h2 class="title"><a href="./category.do?category=家用电器">家用电器</a></h2>
                    <div class="nei_pohot">
                        <ul>
                            <li class="phone_tu">
                                <a href="./detail.do?id=home01">
                                    <div class="ph">
                                        <img src="images/home/181a74dccd6f4a71.jpg" >
                                    </div>
                                    <div class="na">
                                        西门子（SIEMENS）蒸烤箱一体机嵌入式
                                    </div>
                                    <p>￥7999</p>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="box_tit w">
                    <h2 class="title"><a href="./category.do?category=服饰">服饰</a></h2>
                    <div class="nei_pohot">
                        <ul>
                            <li class="phone_tu">
                                <a href="./detail.do?id=clothes01">
                                    <div class="ph">
                                        <img src="images/clothes/16fea7d7bb3f9144.jpg" >
                                    </div>
                                    <div class="na">梵希蔓垂感卡其色西装外套女</div>
                                    <p>￥299</p>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="nav">
            <ul>
                <li class="current">手机</li>
                <li>电脑</li>
                <li>家居</li>
                <li>服饰</li>
                <div class="back">返回顶部</div>
            </ul>
        </div>

        <div class="footer">
            <div class="translate">
                <div class="footer-links">
                    <h5>购物指南</h5>
                    <ul>
                        <li><a href="#">购物流程</a></li>
                        <li><a href="#">会员介绍</a></li>
                        <li><a href="#">生活旅行</a></li>
                        <li><a href="#">常见问题</a></li>
                        <li><a href="#">联系客服</a></li>
                    </ul>
                </div>
                <div class="footer-links">
                    <h5>支付方式</h5>
                    <ul>
                        <li><a href="#">信用卡</a></li>
                        <li><a href="#">货到付款</a></li>
                        <li><a href="#">在线付款</a></li>
                        <li><a href="#">分期付款</a></li>
                    </ul>
                </div>
                <div class="footer-links">
                    <h5>售后服务</h5>
                    <ul>
                        <li><a href="#">售后政策</a></li>
                        <li><a href="#">退款说明</a></li>
                        <li><a href="#">返修/退换货</a></li>
                    </ul>
                </div>
                <div class="footer-links">
                    <h5>帮助中心</h5>
                    <ul>
                        <li><a href="#">账户管理</a></li>
                        <li><a href="#">自助服务</a></li>
                        <li><a href="#">订单操作</a></li>
                        <li><a href="#">服务网点</a></li>
                        <li><a href="#">授权体验店/专区</a></li>
                    </ul>
                </div>
                <div class="footer-links">
                    <h5>关于我们</h5>
                    <ul>
                        <li><a href="#">新浪微博</a></li>
                        <li><a href="#">官方微信</a></li>
                        <li><a href="#">联系我们</a></li>
                        <li><a href="#">加入我们</a></li>
                        <li><a href="#">公益基金会</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </body>
</html>
